#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 1e5 + 10;

LL n, k;
LL a[N];

int check(int x)
{
	int ans = 0;
	for(int i = 1;i <= n;i ++) ans += a[i] / x;
	return ans;
}

int main()
{
	cin >> n >> k;
	LL mx = 0;
	for(int i = 1;i <= n;i ++)
	{
		cin >> a[i];
		mx = max(mx, a[i]);
	}
	int l = 0, r = mx;
	while(l < r)
	{
		int mid = l + r + 1 >> 1;
		if(check(mid) >= k) l = mid;
		else r = mid - 1;
	}	
	cout << l << endl;
	return 0;
}